www.gusucode.com > 星梦奇缘交友网 1 > 星梦奇缘交友网 1.0源码程序/love/activepass.asp

    <!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<!--#include file=md5.asp-->
<%
 '=========================================================
' File: activepass.asp
' Version:3.0
' Date: 2005-8-19
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 920520.com All rights reserved.
' Web: http://www.920520.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ:10689579 Msn:zdlmicr@hotmail.com
'=========================================================
dim username
dim password
dim repassword
dim answer
stats="激活密码"
if request("username")="" or request("pass")="" or request("repass")="" or request("answer")="" then
	Errmsg=Errmsg + "<br><li>非法参数!"
	founderr=true
	call nav()
else
	username=checkStr(request("username"))
	password=checkStr(request("pass"))
	repassword=md5(checkStr(request("repass")),16)
	answer=md5(request("answer"),16)
	sql="select userpassword,userclass,UserGroupID from [Ms_user] where username='"&username&"' and userpassword='"&password&"' and Useranswer='"&answer&"'"
	set rs=server.createobject("adodb.recordset")
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		Errmsg=Errmsg + "<li>您返回的用户资料不正确,非法操作!"
		founderr=true
		call nav()
		call head_var("激活密码","activepass.asp")
	else
		if rs("usergroupid")<4 then
		Errmsg=Errmsg + "<li>用户等级为管家或超级总管必须和管理员联系取回密码,非法操作!"
		founderr=true
		call nav()
		else
		rs("userpassword")=repassword
		rs.update
		sucmsg="您的密码成功激活,<a href=login.asp>请登陆</a>"
		call nav()
		call MsLove_suc()
		end if
	end if
	rs.close
	set rs=nothing
end if
if founderr then call MsLove_error()
call footer()
call activeonline()
%>